//index.js
//获取应用实例
var dex = require("../staplefood/staplefood_1.js")
const app = getApp()
Page({
  data: {
     top:[],
    motto: 'Hello World',
    userInfo: {},
    hasUserInfo: false,
    canIUse: wx.canIUse('button.open-type.getUserInfo'),
    imgUrls: [
      'http://img.weiye.me/zcimgdir/album/file_591163e6b1ef5.png',
      'http://img.weiye.me/zcimgdir/album/file_591163ea5227c.png',
    ],
    indicatorDots: true,
    autoplay: true,
    interval: 4000,
    duration: 1000,
    circular: true,
    imgUrls_1: [
      'http://img.weiye.me/zcimgdir/album/file_5912aafde2231.png',
      'http://img.weiye.me/zcimgdir/album/file_59102b946b0f1.png',
    ],
    a: true,
    c: true,
    d: 3000,
    e: 1000,
    b: true
  },
  btn(e) {
    var state = e.currentTarget.dataset.state
    wx.navigateTo({
      url: '/pages/staplefood/staplefood?state='+ state,
    })
  },
   onLoad: function (options) {
    this.setData({top:dex.sta})
  },
  art() {
    wx.navigateTo({
      url: '/pages/index/article/article',
    })
  },
 p(a) {
    var id = a.currentTarget.dataset.id
    wx.navigateTo({
      url: '/pages/index/particulars/particulars?id=' + id,
    })
  },
  xiadan() {
    wx.navigateTo({
      url: '/pages/index/pay/pay'
    })
  },
  coupon() {
    wx.navigateTo({
      url: '/pages/index/coupon/coupon',
    })
  },
})